import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
  {
    path: '/home',
    name: 'home',
    redirect: '/apply',
    component: HomeView,
    children: [
      { path: '/apply', name: 'Apply', component: () => import(/* webpackChunkName: "apply" */ '../pages/Apply/index.vue') },
      { path: '/approve', name: 'Approve', component: () => import(/* webpackChunkName: "approve" */ '../pages/Approve/index.vue') },
      { path: '/record', name: 'Record', component: () => import(/* webpackChunkName: "record" */ '../pages/Record/index.vue') },
    ],
  },
  {
    path: '/',
    name: 'cover',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/CoverView.vue'),
  },
]



const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
